<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateAppsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('apps', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('app_id',15)->index()->comment('appid');
            $table->string('app_secret',32)->comment('密钥');
            $table->string('app_name',32)->comment('名称');
            $table->string('app_desc',150)->nullable()->comment('简介');
            $table->timestamps();
            $table->softDeletes();
            $table->engine="InnoDb";
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('apps');
    }
}
